 function dialog()
    {
        $(function() {
            $( "#dialog" ).dialog({
                title:'Formulario De Servicio',
                autoOpen:true,
                width:440,
                height:490 ,
                modal:true,
                draggable:false,
                resizable:false,
                show: "fold",
                hide: "scale",
                dialogClass:"dialog",
                buttons: [ { text: "",
                        "class": 'boton-caja-dialog',
                        click: function(){
                            
                            if(jQuery("#formplace").valid()){  $('#formplace').submit(); }
                            
                        } } ]
            });
        });
        
       var form = $("#formplace");
    form.validate({
        
        errorElement: "span",
        rules:{
            
           
            nombre:{
                
                required:true,
                minlength:5,
                maxlength : 40
                
            },
            
            telefono2:{
                
                required:true,
                minlength:10,
                maxlength:20,
                number:true
                
            },
            
            telefono:{
                
                required:true,
                minlength:10,
                maxlength:20,
                number:true
                
            },
            
            email:{
                required:true,
                email:true 
            },
            
            email2:{
                required:true,
                email:true,
                equalTo:"#email"
            }
            
        },
        messages:{
             
            nombre:{
                
                required:"Campo Requerido.",
                minlength:"Minimo De Caracteres 5",
                maxlength:"Maximo De caracteres 40"
                
            },
            
            telefono2:{
                
                required:"Campo Requerido.",
                minlength:"Minimo De Caracteres 10",
                maxlength:"Maximo De caracteres 20",
                number:"Solo Caracteres Numericos."
                
            },
            
            telefono:{
                
                required:"Campo Requerido.",
                minlength:"Minimo De Caracteres 10",
                maxlength:"Maximo De caracteres 20",
                number:"Solo Caracteres Numericos."
                
            },
            
            email:{
                required:"Campo Requerido.",
                email:"Solo Correos Electronicos."
            },
            
            email2:{
                required:"Campo Requerido.",
                email:"Solo Correos Electronicos.",
                equalTo:"Los Correos Electronicos Deben Ser Iguales."
            }
            
        }
        
    }); 
      
        
       
    }
    
   